
/*******************************************************
1.string to char
2.endsWith 
********************************************************/

import java.util.Arrays;

public class Main { 
    public static void main(String[] args) { 
	String arr1= "this is my work";

	char[] ccc=arr1.toCharArray();
	
	for(int element : ccc){
		System.out.print(element+" ");
	}

	System.out.println();

	for(int i=0;i<ccc.length;i++){
		System.out.print(ccc[i]);
	}

	System.out.println();

	String[] arr2= {"1.jpg","2.pcb","3.lna"};

	for(int i=0;i<arr2.length;i++){
		if(arr2[i].endsWith("jpg")){
			System.out.println(arr2[i]);
		}
	}
    } 	
} 
